package com.ss.android.newmedia.util;

import android.app.Activity;
import android.content.Context;
import android.content.DialogInterface;
import android.os.Build;

import com.ss.android.common.app.permission.PermissionsManager;

import org.json.JSONObject;

final class c implements DialogInterface.OnClickListener {
    public final Context a;
    public final String b;
    public final String c;
    public final String d;
    public final JSONObject e;
    public final long[] f;

    c(Context arg1, String arg2, String arg3, String arg4, JSONObject arg5, long[] arg6) {
        this.a = arg1;
        this.b = arg2;
        this.c = arg3;
        this.d = arg4;
        this.e = arg5;
        this.f = arg6;

    }

    public final void onClick(DialogInterface arg7, int arg8) {
        if(Build.VERSION.SDK_INT < 23) {
            long v0 = AppUtil.a(this.a, this.b, this.c, this.d, this.e);
            if(this.f != null && this.f.length > 0) {
                this.f[0] = v0;
            }
        } else if((this.a instanceof Activity)) {
            PermissionsManager.getInstance().requestPermission((Activity) this.a, new String[]{"android.permission.WRITE_EXTERNAL_STORAGE"}, new com.ss.android.newmedia.util.d(this));
        }
    }
}

